package com.hfzy.ihk.common.facade.enums;

import com.hfzy.ihk.common.facade.CustomEnumType;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/7/19.
 * 跟进反馈
 * @author wws
 */
public enum CustomerFollowCategory implements CustomEnumType {

    ACCEPT("a", "接受邀请"),
    CONTINUE_FOLLOW("cf", "继续跟进"),
    NO_INTEREST("ni", "没有兴趣"),
    NO_ONE_RECEIVE("nor", "无人接听"),
    INVALID_PHONE("ip", "无效号码"),
    ON_HOOK("oh", "电话挂机");

    private CustomerFollowCategory(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    private static Map<String, CustomerFollowCategory> map = new HashMap<>();
    static {
        for (CustomerFollowCategory value : CustomerFollowCategory.values()) {
            map.put(value.getValue(), value);
        }
    }

    public static CustomerFollowCategory fromValue(String value) {
        CustomerFollowCategory ret = map.get(value);
        if (ret != null) {
            return ret;
        } else {
            throw new IllegalArgumentException("No enum const " + CustomerFollowCategory.class + "." + value);
        }
    }

}
